package com.sskj.gcc.market.data;

import com.sskj.common.util.TimeFormatUtil;

import java.util.Date;

public class TradeBean {


    public TradeBean(String buyprice, String buynum, int otype, long addtime) {
        this.buyprice = buyprice;
        this.buynum = buynum;
        this.otype = otype;
        this.addtime = addtime;
    }

    public void setBuyprice(String buyprice) {
        this.buyprice = buyprice;
    }

    public void setBuynum(String buynum) {
        this.buynum = buynum;
    }

    public void setOtype(int otype) {
        this.otype = otype;
    }

    public void setAddtime(long addtime) {
        this.addtime = addtime;
    }

    /**
     * tran_id : 2
     * tran_no : 79152280707911
     * userid : 1
     * account : 38411
     * username : yazl
     * pid : 3
     * pname : ETH/USDT
     * buyprice : 388.5418
     * buynum : 2
     * price : 19.4271
     * totalprice : 38.8542
     * otype : 1
     * addtime : 1522807079
     * stopwin : 0.00
     * stoploss : 0.00
     * sellprice : 388.5418
     * profit : 0.0000
     * sxfee : 0.0389
     * selltime : 1522824641
     * dayfee : 0.0000
     * tpath : 1,2
     */



    public String buyprice;
    public String buynum;

    public int otype;
    public long addtime;


    public String getBuyprice() {
        return buyprice;
    }


    public String getBuynum() {
        return buynum;
    }


    public int getOtype() {
        return otype;
    }


    public String getAddtime() {
        return TimeFormatUtil.SF_FORMAT_H.format(new Date(addtime * 1000));
    }


}
